package com.say.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.say.bean.domain.Words;


@Repository
public interface WordsDao extends JpaRepository<Words, String> {
	
	@Query(nativeQuery = true, value = " select * from words t WHERE t.type=?1 order by rand() LIMIT 1 ")
	public Words getRandomByWordsType(Integer type);
	
	
}
